<template>
  <div>
    御剑乘风来,除魔天地间!---app
    <RefCom ref="box"></RefCom>
    <h1 v-if="flag" ref="xjjDom">真的好看,那个小姐姐</h1>
    <button @click="btn">渲染小姐姐</button>
  </div>
</template>
<script>
import RefCom from './components/Ref.vue';
export default {
  name: 'app',
  components: {
    RefCom
  },
  data () {
    return {
      flag: true
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    btn () {
      this.flag = !this.flag
      console.log(this.$refs.xjjDom, 1111)
      //获取dom 小姐姐
      this.$nextTick(() => {
        console.log(this.$refs.xjjDom)

      })
    }
  },
  mounted () {
    console.log(this.$refs.box.name)

  }
}
</script>
<style lang='less'  scoped>
</style>
